package com.nxn.core.web.action.customer;

import java.util.List;

import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.nxn.core.model.Customer;
import com.nxn.core.utils.Page;
import com.nxn.core.web.action.base.DWZCRUDAction;

@Controller("customerAction")
@Scope("prototype")
@ParentPackage("ajax-request")
@Results( { @Result(name = "reload", type="json",
	params={"excludeNullProperties","true"})} )
public class CustomerAction extends DWZCRUDAction<Customer, Long> {
	private static final long serialVersionUID = 4664045852948488862L;
	
	@Override
	public String save() throws Exception {
		setNavTabId("customer");
		return super.save();
	}

	public List<Customer> getItems() {
		return entityList;
	}
	
	public Page<Customer> getPage() {
		return page;
	}

	public String getStatusCode() {
		return statusCode;
	}

	public String getMessage() {
		return message;
	}

	public String getNavTabId() {
		return navTabId;
	}

	public String getForwardUrl() {
		return forwardUrl;
	}

	public String getCallbackType() {
		return callbackType;
	}
	
}
